<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel='stylesheet' href="css/plantsDictionary.css">
        <title>PlantsDictionary</title>
    </head>
    <style>

    </style>
    <body style="text-decoration: none;">
        <?php
        include_once 'mydb.php';
        require_once 'pinyin.class';
        $pdo = getConnect();
        $pinyin = new EJCMS_Pinyin();

        $name = $_GET['name'];
//        echo $name;
        //别名 分布 特征  用途
        $queryDic = "select ID, Search_name,Distribution,Another_name, "
                . "Characters,Utility from plants where Search_name='" . $name . "'";

        $resultSet = $pdo->query($queryDic);


        if ($resultSet) {
            $rows = $resultSet->fetchAll();
            foreach ($rows as $Row) {
                $pln = $Row['Search_name'];
                $plnpy = $pinyin->encode($pln, "all");

                echo'<div class="whole">';
                echo'<a href="plantsPicture.php?Pname=' . $Row['Search_name'] . '"><img src="../plantsImg/' . $plnpy . '1.jpg">';
                echo'<div class="divm" >';
                echo'<h1 >';
                echo $Row['Search_name'];
                echo'</h1>';
                echo'</div>';
                echo'<br>';
                echo'<div class="div1" >';
                echo'<p>';
                echo'别名：  ';
                echo $Row['Another_name'];
                echo'</p>';
                echo'</div>';

                echo'<div class="div1" >';
                echo'<p >';
                echo'产地分布：  ';
                echo $Row['Distribution'];
                echo'</p>';
                echo'</div>';

                echo'<div class="div1">';
                echo'<p>';
                echo'生态特征：  ';
                echo $Row['Characters'];
                echo'</p>';
                echo'</div>';

                echo'<div class="div1" >';
                echo'<p>';
                echo'园林用途：  ';
                echo $Row['Utility'];
                echo'</p>';
                echo'</div>';

                echo'</div>';
            }
        }
        ?>
    </body>
    <!--    <script>
    
            function showPicture() {
    
                window.location.href = "plantsPicture.php";
            }
        </script>-->



</html>